package ru.papergames.battleserver.network.serverpackets.flashuser;

import ru.papergames.battleserver.model.battle.BattlePlayer;

/**
 * @author Alexander Troshanin
 */
public class BattlePlayerActionPointsChanged extends PaperGameServerPacket {

    private BattlePlayer player;

    public BattlePlayerActionPointsChanged(BattlePlayer player) {
        this.player = player;
    }

    @Override
    protected int getPacketId() {
        return BATTLE_PLAYER_ACT_POINTS_CHANGED_PACKET_ID;
    }

    protected void writePacketData() {
        writeH(player.getActionPointsLeft());
    }

}
